import {
	defineStore
} from 'pinia'
import {
	ref
} from 'vue'

export const useTripStore = defineStore('trip', () => {
	const detail = ref({})
	const setDetail = (newObj) => {
		detail.value = newObj
	}
	return {
		detail,
		setDetail,
	}
}, {
	persist: {
		storage: {
			getItem(key) {
				return uni.getStorageSync(key)
			},
			setItem(key, val) {
				uni.setStorageSync(key, val)
			}
		}
	}
})